package 笔试.阿里;

import java.util.Scanner;

/**
 * @author:谢君臣
 * @Date:2021/9/3-18:49
 * @version:1.0
 * @function:
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = Integer.parseInt(scanner.nextLine());
        String A = scanner.nextLine();
        String B = scanner.nextLine();
        int j =0 ,count = 0;
        int [] dp = new int[n];
        for (int i = 0; i < n; i++) {
            if (A.charAt(i)!=B.charAt(i)) dp[i] = 0;
            else dp[i] = 1;
        }
        for (int i = 0; i < n; i++) {
            if (dp[i] == 0) j++;
            else {
                if (j>0)count++;
                j=0;
            }
        }
        if (j>0)count++;
        System.out.println(count);
    }
}
